1. Field of the Invention
The present invention relates to a multiplexing method and apparatus thereof for data switching. More particularly, the present invention relates to a multiplexing method and apparatus thereof for data switching, which include arrangement of frames in super frames and table switching.
2. Description of Related Art
With development of network switching technology and increase of network bandwidth, an Internet service provider (ISP) may provide more different types of network services. In a former network with limited bandwidth, only text data or voice data can be transmitted. In now days, with increase of network bandwidth, image data or video data can be transmitted on network. However, different bit error rates (BERs) are required for transmitting the aforementioned different data. For example, a low BER is required for transmitting the image data so as to obtain a relatively clear image, and a relatively high BER is allowed while transmitting the voice data, since a user may just care about identification of the voice, not clearness or elegancy of the voice.
An error correction code for protecting a transmitting data may achieve its error correction function by adding additional bits to the transmitting data. The more the additional bits added, the better effect the error correction is, i.e. the better error correction effect the error correction code achieves, and the lower BER the transmitting data has. Therefore, application of a same error correction code having better error correction ability for the transmitting data requiring different BERs may significantly decrease a transmission rate. However, if a same error correction code having lower error correction ability is applied for protecting the transmitting data requiring different BERs, although the transmission rate is not decreased greatly, transmission of the data requiring the lower BER cannot be satisfied.
Therefore, an unequal error protection (UEP) method is provided for protecting the transmitting data requiring different BERs. According to the method, different error correction codes with different qualities are applied to the transmitting data requiring different BERs, so as to meet the requirement of different BERs for different transmitting data without a great decrease of the transmission rate.
FIG. 1 is a circuit diagram illustrating a conventional multiplexing method for unequal error protection. As shown in FIG. 1, a continuous data is divided into four sequence codes SF1, SF2, SF3 and SF4, in which each of the sequence codes SF1˜SFW represents a super frame. Each of the super frames SF1˜SF4 includes a plurality of transmitting data S1, S2 . . . SW, and each of the transmitting data S1, S2 . . . SW represents a frame. A rate-compatible punctured code encoder 10 punctures each of the frames S1˜SW to achieve the unequal error protection effect. Each of the frames S1˜SW requires a different BER. If a relation of the BERs for the frames S1˜SW within each of the super frame SF1˜SF4 is PS1>PS2> . . . >PSW, the frames S1˜SW within each super frame is then sorted as S1, S2 . . . SW.
In other words, frames S1˜SW of each super frame SF1˜SF4 are sorted according to a corresponding required BER of each of the frames S1˜SW decreasingly or increasingly. Then, a string of bit codes padded with zeros is added to the tail of each of the super frames SF1˜SF4 to meet a requirement of bit length of an input bit and avoid a mass of errors occurred in the UEP system due to utilization of a hard switching method (which will be described in the follows) by the rate-compatible punctured code encoder 10. However, in this data multiplexing method for UEP, since the frames of each super frame are sorted by its corresponding required BERs decreasingly or increasingly, unexpected errors may occur in the system due to excessive instant changes of the BERs when a receiving terminal performs decoding on the frames closely connected between two adjacent super frames. Meanwhile, adding of the string of bit codes may decrease an actual transmission rate and throughout rate (i.e. waste of bandwidth). Accordingly, transmission efficiency and bandwidth utilization of the UEP system are poor.
FIG. 2 is a diagram of bit error rates on a receiving terminal according to a conventional data multiplexing method for unequal error protection. As shown in FIG. 2, there is an instant increase of the BERs of the frames SW and S1 closely connected between two adjacent super frames, which will cause the unexpected errors of the UEP system. Accordingly, a protection efficiency of the UEP system is decreased.
FIG. 3 is a circuit diagram of a rate-compatible punctured code encoder 10. Referring to FIG. 3, the encoder 10 includes a convolution code encoder 101 and a puncturing unit 102. The encoder 10 encodes and punctures the frames S1˜SW requiring different BERs to perform different degrees of protection on the frames S1˜SW, such that the UEP effect is achieved. The relation of the required BERs of the frames S1˜SW is PS1>PS2 . . . >PSW. The operation principle is as follows. First, the convolution code encoder 101 performs convolution encoding on the frames S1˜SW and outputs an encoded data C_parent. Next, the puncturing unit 102 provides different puncturing tables T1, T2 . . . TW to the frames S1, S2 . . . SW requiring the different BERs. Finally, the encoded data C_parent is punctured according to the puncturing tables to form a punctured encoded data C_child.
For example, as to the frame S1, after the convolution code encoder 101 performs convolution encoding on the frames S1˜SW and generates the encoded data C_parent, the puncturing unit 102 provides the corresponding puncturing table T1 to the frame S1. Then, the puncturing unit 102 starts to puncture the encoded data C_parent according to a start position of the puncturing table T1, and outputs the punctured encoded data C_child. During which if a bit code located at a certain position of the puncturing table T1 is 1, the puncturing unit 102 then outputs the encoded data C_parent located in a position corresponding to that in the puncturing table T1; and if the bit code located at a certain position of the puncturing table T1 is 0, the puncturing unit 102 then punctures the encoded data C_parent located in the position corresponding to that in the puncturing table T1.
Assuming the encoded data of the frame S1 after being convolution encoded is C_parent=[1 0 1 1 1; 0 0 0 1 1], and the puncturing unit 102 provides the puncturing table T1=[0 0 0 1 1; 1 0 1 1 1] to the frame S1. Then, the puncturing unit 102 starts to puncture the encoded data C_parent according to the start position of the puncturing table T1, and generates the punctured encoded data C_child=[x x x 1 1; 0 x 0 1 1], wherein x represents the data punctured, i.e. x will not be transmitted. Therefore, according to the above example, the data outputted by the puncturing unit 102 is 110011.
As described above, to achieve the UEP effect, and if the relation of the BERs required by the frames S1˜SW is PS1>PS2 . . . >PSW, the puncturing unit 102 may sequentially provide the puncturing tables T1˜TW to the corresponding frames S1˜SW, wherein the relation of the puncturing tables T1˜TW will be described as follows. If the bit code located at a certain position in the puncturing table T1 is 1, the bit codes located at the same positions of the puncturing tables T2˜TW are also 1. If the bit code located at a certain position in the puncturing table T2 is 1, the bit codes located at the same positions of the puncturing tables T3˜TW are also 1. The relations of the other puncturing tables may be deduced accordingly. For example, if the bit code located at a first column and a second row of the puncturing table T1 is 1, the bit code located at the first column and the second row of each of the puncturing tables T2˜TW is also 1.
According to the aforementioned relation of the puncturing tables T1˜TW, the number of bits punctured in the frames S1˜SW has a relation of S1>S2> . . . >SW. Namely, protection degrees of the frames S1˜SW provided by the encoder 10 have an order of S1<S2< . . . <SW. According to the different protection degrees of the frames S1˜SW provided by the encoder 10, the error correction ability provided by the encoder 10 may satisfy the requirement of different BERs for the frames S1˜SW, such that the UEP can be achieved.
Referring to FIG. 3 again, in the conventional UEP method, the puncturing unit 102 starts to perform the puncturing process on the encoded data C_parent according to the corresponding start positions of the puncturing tables. The puncturing unit 102 switches to a suitable puncturing table every time when the BER of the inputted frame changes to perform the puncturing process, wherein the puncturing processes of the encoded data C_parent are all started according to the start position of the corresponding puncturing table. This switching method is referred to as a hard switching method. However, the hard switching method may decrease the efficiency of the UEP and cause more errors on the data received by the receiver terminal, and therefore the BERs required by the frames S1˜SW cannot be satisfied.
The reason why the hard switching method may decrease the efficiency of the UEP will be explained in the following examples. First, an example with no decrease of the UEP efficiency due to the hard switching method is provided, then, an example with decrease of the UEP efficiency due to the hard switching method is provided, so as to aid the explanation of why the rate-compatible punctured code encoder 10 using the hard switching method may decrease its UEP efficiency.
Assuming the encoded data of the frame S1 is [1 0 1 1 1; 0 0 0 1 1] after being convolution encoded by the convolution encoder 101, and the corresponding puncturing table T1 is [0 0 1 1; 0 1 1 1]; the encoded data of the frame S2 is [1 0 1 1 1; 0 0 0 1 1] after being convolution encoded by the convolution encoder 101, and the corresponding puncturing table T2 is [0 0 1 1 1; 1 0 1 1 1]. Then, the convolution encoder 101 encodes the frames S1 and S2, and generates the ecoded data C_parent=[1 0 1 1 1 1 0 1 1 1; 0 0 0 1 1 0 0 0 1 1]. The puncturing unit 102 starts to puncture the encoded data C_parent according to the start position of the puncturing table T1 until puncturing of the data located at 0˜4 columns of the encoded data C_parent is completed. Next, the puncturing unit 102 starts to puncture the data located at 5˜9 columns of the encoded data C_parent according to the start position of the puncturing table T2 until puncturing of the data located at 5˜9 columns of the encoded data C_parent is completed. Finally, the puncturing unit 102 generates the punctured encoded data C_child=[x x x 11 x x 1 1 1; 0 x 0 1 1 0 x 0 1 1]. Now the hamming weight of the punctured encoded data C_child is 9, and the aforementioned hamming weight is the number of the bit codes having a value “1” within the encoded data. Great changes of the hamming weight may cause a great increasing of the BERs. However, in the present example, there is no decrease of the UEP efficiency due to the hard switching method.
However, if assuming the encoded data of the frame S1 is [1 0 1; 0 0 0] after being convolution encoded by the convolution encoder 101, and the corresponding puncturing table T1 is [0 0 0 1 1; 1 0 1 1 1]; the encoded data of the frame S2 is [1 1 1 0 1 1 1; 1 1 0 0 0 1 1] after being convolution encoded by the convolution encoder 101, and the corresponding puncturing table T2 is [0 0 1 1 1; 1 0 1 1 1]. Then, the convolution encoder 101 encodes the frames S1 and S2, and generates the encoded data C_parent=[1 0 1 1 1 1 0 1 1 1; 0 0 0 1 1 0 0 0 1 1]. Next, the puncturing unit 102 starts to puncture the data located at 0˜2 columns of the encoded data C_parent according to the start position of the puncturing table T1. Namely, the data located at 0˜2 columns of the encoded data C_parent are punctured according to the data located at 0˜2 columns of the puncturing table T1. Then, the puncturing unit 102 starts to puncture the data located at 3˜9 columns of the encoded data C_parent according to the start position of the puncturing table T2. However, the 3˜9 columns of the encoded data C_parent include more columns than that included in the puncturing table T2. Therefore, the puncturing process is also started according to the start position of the puncturing table T2, until the end position of the puncturing table T2. In this case, some bits of the encoded data C_parent will be left un-punctured. Then, the puncturing process is restarted according to the start position of the puncturing table T2 until puncturing of the C_parent is completed.
In other words, the puncturing unit 102 first punctures the data located at 3˜7 columns of the encoded data C_parent according to the data located at 0˜4 columns of the puncturing table T2. Then, the data located at 8˜9 columns of the encoded data C_parent are punctured according to the data located at 0˜1 columns of the puncturing table T2. Finally, the puncturing unit 102 generates the punctured encoded data C_child=[x x x x x 1 0 1 x x; 0 x 0 1 x 0 0 0 1 x]. However, in this case, the hamming weight of the punctured encoded data C_child is 4. Therefore, the efficiency of the encoder 10 using the hard switching method may be decreased due to variation of the hamming weight, and the UEP efficiency of the encoder 10 is decreased accordingly. Moreover, another undesirable phenomenon shown in this example is that the punctured bits are excessively concentrated, which may easily cause decoding errors of a decoder. In summary, the UEP efficiency of the encoder 10 using the hard switching method is decreased. Therefore, the encoder 10 using the hard switching method cannot satisfy the requirement of different BERs of the frames S1˜SW.
Therefore, based on the aforementioned description, the algorithm of the hard switching method may be represented by:
C_parenti,t is allowed for transmission as Ti,(t-tk)mod p(k)=1;
C_parenti,t is deleted from encoder outputs as Ti,(t-tk)mod p (k)=0;
for any t in the range between tk and tk′
Wherein tk represents the end position of a (k−1)-th puncturing table plus 1. Tij(k) represents the bit code located at i-th row and j-th column in a k-th puncturing table, and the number of the total columns of the k-th puncturing table is p. tk′ represents a k-th frame is ended on a tk′-th column of the C_parent. C_parenti,t represents the encoded data located at the i-th row and t-th colomn. If the bit code located at the i-th row and (t−tk mod p)-th column of the puncturing table is 1, data located at i-th row and t-th column of the encoded data C_parent can be transmitted. If the bit code located at the i-th row and (t-tk mod p)-th column of the puncturing table is 0, data located at i-th row and t-th column of the encoded data C_parent is punctured.
Though the encoder using the hard switching method may add a string of bit codes padded with zeros to each of the encoded data to avoid decrease of the UEP efficiency due to utilization of the hard switching method. However, adding of the string of the bit codes may decrease a transmission rate and a throughout rate of the system.
In summary, arrangement of the super frames of the conventional data multiplexing method for UEP has a shortage of excessive instant increasing or decreasing of the BERs of the frames between two adjacent super frames, which will cause unexpected errors in the system. Though a string of bit codes padded with zeros may be added to the tail of each of the super frames to meet the requirement of bit length of an input bit and avoid a mass of errors occurred in the UEP system due to utilization of the hard switching method, adding of the string of bit codes may also cause a waste of the system bandwidth and a decrease of the transmission rate. Moreover, application of the hard switching method by the puncturing unit of a conventional UEP system may greatly decrease the hamming weight of the punctured encoded data on the junction of the super frames, and cause a poor UEP effect. Though a string of bit codes padded with zeros may be added to each of the encoded data to increase the UEP efficiency, it may also cause a waste of the system bandwidth and a decrease of the transmission rate. Accordingly, the present invention provides a multiplexing method and apparatus thereof for data switching, such that the UEP efficiency can be improved, and waste of the system bandwidth can be avoided.